From: Marek Vasut Date: Sat, 30 Mar 2019 03:01:41 +0000 (+0100) Subject: rcar_gen3: plat: Print DRAM bank size in MiB if below 1 GiB X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=5b4f022be4f0c72709e3a526574de1d79b385a4c;p=project%2Fbcm63xx%2Fatf.git rcar_gen3: plat: Print DRAM bank size in MiB if below 1 GiB Print the DRAM bank size in MiB instead of GiB in case the bank size is smaller than 1 GiB. This prevents printing zeroes on systems with small DRAM sizes. Signed-off-by: Marek Vasut --- diff --git a/plat/renesas/rcar/bl2_plat_setup.c b/plat/renesas/rcar/bl2_plat_setup.c index de8588c6..7442942c 100644 --- a/plat/renesas/rcar/bl2_plat_setup.c +++ b/plat/renesas/rcar/bl2_plat_setup.c @@ -482,8 +482,10 @@ static void bl2_advertise_dram_entries(uint64_t dram_config[8]) if (!size) continue; - NOTICE("BL2: CH%d: %llx - %llx, %lld GiB\n", - chan, start, start + size - 1, size >> 30); + NOTICE("BL2: CH%d: %llx - %llx, %lld %siB\n", + chan, start, start + size - 1, + (size >> 30) ? : size >> 20, + (size >> 30) ? "G" : "M"); } /*